layui.define(['jquery'], function (exports) {
    var $ = layui.jquery;
    var titleHeight;
    var parentHeight;
    var contentHeight;
    titleHeight = $('.layui-tab-title').outerHeight();
    parentHeight = $('.layui-tab-title').parent().height();
    contentHeight = parentHeight - titleHeight;
    $('.layui-tab-content').height(contentHeight);
    var tabHeight = {
        init: function () {
            titleHeight = $('.layui-tab-title').outerHeight();
            parentHeight = $('.layui-tab-title').parent().height();
            contentHeight = parentHeight - titleHeight;
            $('.layui-tab-content').height(contentHeight);
        }
    };
    $(window).resize(function () {          //当浏览器大小变化时
        tabHeight.init();
    });
    exports('tabHeight', tabHeight);
});
